package xyz.riceball.job.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.riceball.job.entity.dto.JobTriggerDTO;
import xyz.riceball.job.entity.po.JobTriggerPO;

/**
 * <p>
 * 任务业务接口
 * </p>
 *
 * @author xiaovcloud
 * @since 2022/6/12 21:13
 */
public interface JobService extends IService<JobTriggerPO> {
    JobTriggerPO addJob(JobTriggerDTO jobTriggerDto);

    void deleteJob(String id);

    void pauseJob(String id);

    void resumeJob(String id);

    void cornJob(JobTriggerDTO jobTriggerDto);

    /**
     * 分页查询任务信息
     *
     * @param page
     * @param jobTriggerPO
     * @return
     */
    Page<JobTriggerPO> selectPage(Page<JobTriggerPO> page, JobTriggerPO jobTriggerPO);
}
